﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<title>IupSbox</title>

<link rel="stylesheet" type="text/css" href="../../style.css">
</head>
<body>
<div id="navigation">
  <ul>
    <li><a href="#Creation">Creation</a></li>
    <li><a href="#Attributes">Attributes</a></li>
    <li><a href="#Callbacks">Callbacks</a></li>
    <li><a href="#Notes">Notes</a></li>
    <li><a href="#Examples">Examples</a></li>
    <li><a href="#SeeAlso">See Also</a></li>
  </ul>
</div>

<h2>IupSbox</h2>
<p>Creates a void container that allows its child to be resized. Allows 
expanding and contracting the child <strong>size</strong> in one 
direction.</p>

  <p>
  It does not have a native representation but it contains also a <strong>IupCanvas</strong> to implement 
	the bar handler.</p>

<h3><a name="Creation">Creation</a></h3>

<pre>Ihandle* IupSbox(Ihandle*<strong> child</strong>); [in C]
iup.sbox{<strong>child</strong>: ihandle} -&gt; (<strong>elem</strong>: ihandle) [in Lua]
sbox(<strong>child</strong>) [in LED]</pre>
  <p><strong>child</strong>: Identifier of an interface element which will receive the 
	box. It can be NULL.</p>
  <p>
  <u>Returns:</u> the identifier of the 
  created element, or NULL if an error occurs.</p>

<h3><a name="Attributes">Attributes</a></h3>


<p><strong>COLOR</strong>: Changes the color of the
  bar handler. The value should be given in &quot;R G B&quot; color style. 
Default: &quot;192 192 192&quot;.</p>


<p><strong>DIRECTION</strong> (creation only): Indicates the direction of the 
resize and the position of the bar handler. Possible values are &quot;NORTH&quot;, &quot;SOUTH&quot; 
(vertical direction), &quot;EAST&quot; or &quot;WEST&quot; (horizontal 
direction). Default: &quot;EAST&quot;.</p>
<p><a href="../attrib/iup_expand.html">EXPAND</a> (<font SIZE="3">non inheritable</font>):
  It will expand automatically only in the direction opposite to the handler.&nbsp;</p>

  <p><b>WID</b> (read-only): returns -1 if mapped.</p>

  <blockquote>
    <hr>
</blockquote>

  <p>
<a href="../attrib/iup_font.html">FONT</a>,
    <a href="../attrib/iup_size.html">SIZE</a>,
<a href="../attrib/iup_rastersize.html">RASTERSIZE</a>,
<a href="../attrib/iup_clientsize.html">CLIENTSIZE</a>, 
	<a href="../attrib/iup_clientoffset.html">CLIENTOFFSET</a>, 
	<a href="../attrib/iup_position.html">POSITION</a>, 
<a href="../attrib/iup_minsize.html">
MINSIZE</a>, <a href="../attrib/iup_maxsize.html">
MAXSIZE</a>: 
also accepted.</p>

<h3>Notes</h3>
<p>The controls that you want to be resized must have the EXPAND=YES attribute set. 
The control inside the sbox will not be resized with a size lesser than its
<strong>Natural</strong> size. See the <a href="../layout_guide.html">Layout Guide</a> for mode details 
  on sizes.</p>
<p>The <strong>IupCanvas</strong> bar handler is always the first child of the 
sbox. It can be obtained using <strong>IupGetChild</strong> or <strong>
IupGetNextChild</strong>.</p>
<p><strong>IupSbox</strong> can be resized above the maximum size so some controls go to outside the dialog area 
  at right or bottom. In fact this is part of the dynamic layout default reposition of controls inside the dialog. See 
  the <strong>IupRefresh</strong> function. The IUP layout does not have a maximum limit only a minimum, 
except if you use the MAXSIZE common attribute.</p>

<p>The box can be created with no elements and be dynamic filled using
  <a href="../func/iupappend.html">IupAppend</a> or
<a href="../func/iupinsert.html">IupInsert</a>.</p>


<h3><a name="Examples">Examples</a></h3>
<p><a href="../../examples/">Browse for Example Files</a></p>

<div align="center">
  <center>
  <table border="0" cellpadding="6" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111">
    <tr>
      <td><img border="0" src="images/iupsbox1.png"><br>
		Natural Size</td>
      <td><img border="0" src="images/iupsbox2.png"><br>
		After Expanding the Sbox</td>
    </tr>
    <tr>
      <td><img border="0" src="images/iupsbox3.png"><br>
		Expanding the Dialog</td>
      <td><img border="0" src="images/iupsbox4.png"><br>
		After Expanding the Sbox</td>
    </tr>
  </table>
  </center>
</div>

</body>

</html>
